package com.cyt.sys.model.po;

import com.cyt.base.util.BaseUtil;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 基础部分-角色数据
 *
 * @author shengQiang yu
 * @date 2019-03-22 16:12
 */
@Getter
@Setter
@Table(name = "base_role_rule")
public class SysRoleRule implements Serializable {

    /**
     * 主键
     */
    @Id
    private String id;

    /**
     * 角色id
     */
    @Column(name = "role_id")
    private String roleId;

    /**
     * 数据id
     */
    @Column(name = "rule_id")
    private String ruleId;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    public SysRoleRule(String roleId, String ruleId) {
        this.id = BaseUtil.uId();
        this.roleId = roleId;
        this.ruleId = ruleId;
        this.createTime = new Date();
    }
}
